package com.service.business.member.controller;

import com.service.business.framework.log.RequestLog;
import com.service.business.member.controller.rep.MemberRWRep;
import com.service.business.member.controller.req.RWRecordPageReq;
import com.service.business.member.service.MemberRWService;
import com.service.business.support.SessionUtil;
import com.service.core.rest.BaseController;
import com.service.core.rest.response.CommonPageRep;
import com.service.core.rest.response.OneResponse;
import com.service.core.rest.response.PageResponse;
import com.service.utility.common.UUIDUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * <dl>
 * <dt>back-end</dt>
 * <dd>Description:</dd>
 * <dd>Copyright: Copyright (C) 2015</dd>
 * <dd>Company: </dd>
 * <dd>CreateDate: 2019年09月24日</dd>
 * </dl>
 *
 * @author
 */

@Slf4j
@RestController()
@RequestMapping("store-rw")
@Api(tags = "会员流水相关信息")
public class MemberRWController extends BaseController {

    @Autowired
    private MemberRWService rwService;

    @ApiOperation("充值或提币流水")
    @RequestLog("充值或提币流水")
    @PostMapping("page/{optType}")
    public PageResponse<MemberRWRep> pageRW(@ApiParam @RequestBody @Validated RWRecordPageReq pageReq, @PathVariable("optType") Integer optType) {
        return successQueryPageResponse(rwService.pageRWRecord(pageReq, optType));
    }


}
